Skip to content

Cherry-pick: Fix autoentity bugs & upgrade library package#3495

Open
RubenCerna2079 wants to merge 3 commits intorelease/2.0from
dev/rubencerna/cherry-pick-bug-fixes-2
Open

Cherry-pick: Fix autoentity bugs & upgrade library package#3495
RubenCerna2079 wants to merge 3 commits intorelease/2.0from
dev/rubencerna/cherry-pick-bug-fixes-2

Conversation

@RubenCerna2079
Copy link
Copy Markdown
Contributor

Why make this change?

This change cherry-picks the PRs that fix the Autoentity bugs and upgrade the OpenTelemetryProtocol library for DAB 2.0.

What is this change?

Cherry-picked PRs:

How was this tested?

Existing tests in cherry-pick cover new changes.

Sample Request(s)

N/A

RubenCerna2079 and others added 3 commits May 4, 2026 16:40
## Why make this change?

- Fixes bug issue #3458

## What is this change?

This changes how the in-memory entities are created from the
`autoentities` property by specifying the schema as well as the object
they come from in the `MsSqlMetadataProvider`, in order for DAB to not
default to the `dbo` schema and cause a failure.

## How was this tested?

- [x] Integration Tests
- [ ] Unit Tests

Added tests that ensure entities that are in the non-default schema
`dbo` are also created without any issues and can be used by the REST
and GraphQL endpoints.

## Sample Request(s)
```
"entities": {},
"autoentities": {
  "default": {
    "patterns": {
      "include": [ "foo.%", "bar.%" ],
      "name": "{schema}_{object}"
    },
    "template": {
      "mcp": { "dml-tools": true },
      "rest": { "enabled": true },
      "graphql": { "enabled": true },
      "health": { "enabled": true },
      "cache": {
        "enabled": false
      }
    },
    "permissions": [
      {
        "role": "anonymous",
        "actions": [
          "create",
          "read",
          "update",
          "delete"
        ]
      }
    ]
  }
```
<img width="1199" height="587" alt="image"
src="https://github.com/user-attachments/assets/972a2314-f84e-471b-a32d-fda1ddff61ad"
/>

---------

Co-authored-by: Souvik Ghosh <souvikofficial04@gmail.com>
## Why make this change?
- Fixes issue #3455 

## What is this change?
This changes the default value of the `patterns.name` property inside
`autoentities` so that it uses both the {schema} and {object} in order
to allow users to use multiple objects that have the same name but are
from different schemas without the need to do additional changes to the
config file.

This PR is dependent on PR #3468.

## How was this tested?

- [X] Integration Tests
- [ ] Unit Tests
- [X] Manual Tests
Used sample below to ensure that different entities with the same object
name but different schema name can be created without the need to change
the `patterns.name` property.

## Sample Request(s)
```
"AllMagazineObjects": {
  "patterns": {
    "include": [
      "%.magazines"
    ]
  },
  "permissions": [
    {
      "role": "anonymous",
      "actions": [
        {
          "action": "*"
        }
      ]
    }
  ]
}
```
<img width="1060" height="499" alt="image"
src="https://github.com/user-attachments/assets/8a8f01ae-a10c-49ba-a3fe-4881c8a2aacd"
/>
<img width="1075" height="649" alt="image"
src="https://github.com/user-attachments/assets/6754b26e-fe24-4f26-adaa-c41c5ee6955f"
/>

---------

Co-authored-by: Souvik Ghosh <souvikofficial04@gmail.com>
….15.3 (#3488)

## Why make this change?

Bump `OpenTelemetry.Exporter.OpenTelemetryProtocol` to pick up patch
fixes from 1.15.3.

## What is this change?

- Updated `OpenTelemetry.Exporter.OpenTelemetryProtocol` from `1.13.0` →
`1.15.3` in `src/Directory.Packages.props` (centrally managed versions)

## How was this tested?

- [ ] Integration Tests
- [ ] Unit Tests

## Sample Request(s)

N/A — dependency version bump only.

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `www.nuget.org`
> - Triggering command:
`/home/REDACTED/work/_temp/ghcca-node/node/bin/node
/home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps
/home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js`
(dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/Azure/data-api-builder/settings/copilot/coding_agent)
(admins only)
>
> </details>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: RubenCerna2079 <32799214+RubenCerna2079@users.noreply.github.com>
Co-authored-by: Ruben Cerna <rcernaserna@microsoft.com>
@RubenCerna2079 RubenCerna2079 marked this pull request as ready for review May 4, 2026 23:46
Copilot AI review requested due to automatic review settings May 4, 2026 23:46
@RubenCerna2079 RubenCerna2079 changed the title Dev/rubencerna/cherry pick bug fixes 2 Cherry-pick: Fix autoentity bugs & upgrade library package May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Cherry-picks fixes around MSSQL autoentity generation (especially schema-qualified naming to avoid collisions) and updates the OpenTelemetry OTLP exporter version.

Changes:

  • Change default autoentity name interpolation to {schema}_{object} and update CLI/schema docs accordingly.
  • Qualify MSSQL generated entity source objects with {schema}.{object}.
  • Expand/update MSSQL autoentity tests to cover schema collision scenarios and new default naming.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Service.Tests/Configuration/ConfigurationTests.cs Updates existing autoentity tests for new naming and adds new coverage for same-object/different-schema scenarios.
src/Directory.Packages.props Upgrades OpenTelemetry OTLP exporter package version.
src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs Updates generated entity source object to include schema qualification.
src/Config/ObjectModel/AutoentityPatterns.cs Changes default autoentity name interpolation pattern to include schema prefix.
src/Cli/Commands/AutoConfigOptions.cs Updates CLI help text to reflect new default pattern.
schemas/dab.draft.schema.json Updates JSON schema default/description for autoentity naming pattern.

Comment thread src/Config/ObjectModel/AutoentityPatterns.cs
Comment thread src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs
Comment thread src/Directory.Packages.props
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

6 participants